To solve the attributes authority and attributes revocation of Attribute-Based Encryption (ABE) in Wireless Sensor Network (WSN), a scheme of trust management-based ciphertext-policy ABE (TM-CP-ABE) was proposed. The proposed scheme was based on ciphertext-policy ABE and combined it with trust management mechanism. The procedure and the steps of trust evaluation based attributes authority and trust update based attributes revocation were provided. The security, complexity and validity of the proposed scheme were analyzed. Compared with the popular encryption scheme in WSN through comprehensive simulation, the results show that the proposed scheme is efficient for attribute revocation of CP-ABE in WSN. By attributes revocation, to a certain extent, the attacks of malicious nodes are also inhibited.